/*
 *  Copyright 2008 Mark Ashworth <javameme@gmail.com>.
 * 
 *  Licensed under the GNU General Public License v3 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.gnu.org/licenses/gpl-3.0.html
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */
package xperiment.metaphor.model.question;

import xperiment.metaphor.model.*;
import xperiment.metaphor.model.entity.Employee;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Appraisal
 * @author Mark Ashworth
 * @version 1.0.0
 */
public class Appraisal extends DomainObject implements Persistent {
    
    /* The unique database id for the object */
    @Id @GeneratedValue(strategy=GenerationType.AUTO) 
    @Column(name = "appraisal_id", unique = true, nullable = false)
    private Long id = null;
    
    private Date appraisalDate;
    private Employee employee;
    private List<AppraisalRating> ratings = new ArrayList<AppraisalRating>();
    
    
    /** Whether the user is enabled */
    @Column(name = "enabled", nullable=true)
    private boolean enabled = true;
    
   
    public Long getId() {
        return this.id;
    }

    public Date getAppraisalDate() {
        return appraisalDate;
    }

    public void setAppraisalDate(Date appraisalDate) {
        this.appraisalDate = appraisalDate;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public List<AppraisalRating> getRatings() {
        return ratings;
    }

    public void setRatings(List<AppraisalRating> ratings) {
        this.ratings = ratings;
    }

    public boolean isEnabled() {
        return this.enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }
}
